﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Meraz.Core.Model
{
    [Serializable]
    public class Blog : IEquatable<Blog>
    {
        public Blog() { }

        #region IBlog Members

        [XmlIgnore]
        public IEnumerable<Post> Posts { get; set; }

        [XmlIgnore]
        public IEnumerable<Alias> Aliases { get; set; }
        public List<BlogStudy> BlogStudies { get; set; }
        public string Code { get; set; }
        public string Name { get; set; }

        public int ID { get; set; }
        [XmlIgnore]
        public BlogKeyType BlogKeyType { get; set; }

        public string Url { get; set; }

        [XmlIgnore]
        public Url HomePage { get; set; }

        #endregion

        public bool Equals(Blog other)
        {
            if (other == null)
                return false;
            return ID.Equals(other.ID);
        }
}
}
